<template>
	<view>
		<!--标题栏-->
		<view class="title-bar">
			<view class="title-text">
				{{ title }}
			</view>
		</view>
		<!--返回按钮-->
		<view class="back-btn" @click="back">
			<uni-icons type="left" color="#9dd2ff" size="32"></uni-icons>
		</view>
	</view>
</template>

<script>
	export default {
		name:"page-nav",
		data() {
			return {
				
			};
		},
		props: ['title'],
		methods: {
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">
.title-bar {
	position: absolute;
	top: 0;
	width: 100%;
	
	height: 48px;
	
	display: flex;
	justify-content: center;
	align-items: center;
	
	.title-text {
		border-radius: 50em;
		border-color: #9dd2ff;
		border-width: 2px;
		border-style: solid;
		
		padding: 4px 96px;
		font-size: 18px;
		
		margin-top: 8px;
	}
}

.back-btn {
	position: absolute;
	top: 4px;
	height: 48px;
	display: flex;
	align-items: center;
	
}
</style>